<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //  /^  [^]
      // const r1 = /<.{1,}?/g;
      // 贪婪匹配
      // 数量+? 表示阻止贪婪模式
      // +?、 {}?、*?
      // const r1 = /<.+?>/g;
      const r1 = /<.{0,}?>/g;
      const str = `<a><b><span><div><>`;
      console.log(str.match(r1));
    </script>
  </body>
</html>
